<template>
  <div style="width: 100%;height: 100%">
    <vue-echarts :options="options"></vue-echarts>
  </div>
</template>

<script>
import { ref, onMounted, watch } from 'vue'
// import VueEcharts from "@/components/VueEcharts";
import * as echarts from 'echarts'
import vCharts from 'vue-echarts'

export default {
  name: 'NmMapWarning',
  setup(ctx) {
    const options = ref({})
    const update = () => {
      /* eslint-disable */
      fetch('http://www.youbaobao.xyz/datav-res/datav/jiangsuMapData.json')
        .then(res => res.json())
        .then(data => {
          console.log(data)
          echarts.registerMap('js', data)
          console.log(echarts.getMap('js'))
          options.value = {
            geo: [{
              map: 'js',
            }]
          }
        })
    }

    onMounted(() => {
      update()
    })



    return {
      options,
    }
  }
}
</script>

<style scoped>

</style>
